3.149 \(\int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx\)

Optimal. Leaf size=77 \[ \frac {a \cos ^3(e+f x)}{3 f}-\frac {a \cos (e+f x)}{f}-\frac {b \sin ^3(e+f x) \cos (e+f x)}{4 f}-\frac {3 b \sin (e+f x) \cos (e+f x)}{8 f}+\frac {3 b x}{8} \]

[Out]

3/8*b*x-a*cos(f*x+e)/f+1/3*a*cos(f*x+e)^3/f-3/8*b*cos(f*x+e)*sin(f*x+e)/f-1/4*b*cos(f*x+e)*sin(f*x+e)^3/f

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {2748, 2633, 2635, 8} \[ \frac {a \cos ^3(e+f x)}{3 f}-\frac {a \cos (e+f x)}{f}-\frac {b \sin ^3(e+f x) \cos (e+f x)}{4 f}-\frac {3 b \sin (e+f x) \cos (e+f x)}{8 f}+\frac {3 b x}{8} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]^3*(a + b*Sin[e + f*x]),x]

[Out]

(3*b*x)/8 - (a*Cos[e + f*x])/f + (a*Cos[e + f*x]^3)/(3*f) - (3*b*Cos[e + f*x]*Sin[e + f*x])/(8*f) - (b*Cos[e +
 f*x]*Sin[e + f*x]^3)/(4*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 2748

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rubi steps

\begin {align*} \int \sin ^3(e+f x) (a+b \sin (e+f x)) \, dx &=a \int \sin ^3(e+f x) \, dx+b \int \sin ^4(e+f x) \, dx\\ &=-\frac {b \cos (e+f x) \sin ^3(e+f x)}{4 f}+\frac {1}{4} (3 b) \int \sin ^2(e+f x) \, dx-\frac {a \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {a \cos (e+f x)}{f}+\frac {a \cos ^3(e+f x)}{3 f}-\frac {3 b \cos (e+f x) \sin (e+f x)}{8 f}-\frac {b \cos (e+f x) \sin ^3(e+f x)}{4 f}+\frac {1}{8} (3 b) \int 1 \, dx\\ &=\frac {3 b x}{8}-\frac {a \cos (e+f x)}{f}+\frac {a \cos ^3(e+f x)}{3 f}-\frac {3 b \cos (e+f x) \sin (e+f x)}{8 f}-\frac {b \cos (e+f x) \sin ^3(e+f x)}{4 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.17, size = 76, normalized size = 0.99 \[ -\frac {3 a \cos (e+f x)}{4 f}+\frac {a \cos (3 (e+f x))}{12 f}+\frac {3 b (e+f x)}{8 f}-\frac {b \sin (2 (e+f x))}{4 f}+\frac {b \sin (4 (e+f x))}{32 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]^3*(a + b*Sin[e + f*x]),x]

[Out]

(3*b*(e + f*x))/(8*f) - (3*a*Cos[e + f*x])/(4*f) + (a*Cos[3*(e + f*x)])/(12*f) - (b*Sin[2*(e + f*x)])/(4*f) +
(b*Sin[4*(e + f*x)])/(32*f)

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 60, normalized size = 0.78 \[ \frac {8 \, a \cos \left (f x + e\right )^{3} + 9 \, b f x - 24 \, a \cos \left (f x + e\right ) + 3 \, {\left (2 \, b \cos \left (f x + e\right )^{3} - 5 \, b \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3*(a+b*sin(f*x+e)),x, algorithm="fricas")

[Out]

1/24*(8*a*cos(f*x + e)^3 + 9*b*f*x - 24*a*cos(f*x + e) + 3*(2*b*cos(f*x + e)^3 - 5*b*cos(f*x + e))*sin(f*x + e
))/f

________________________________________________________________________________________

giac [A]  time = 0.14, size = 66, normalized size = 0.86 \[ \frac {3}{8} \, b x + \frac {a \cos \left (3 \, f x + 3 \, e\right )}{12 \, f} - \frac {3 \, a \cos \left (f x + e\right )}{4 \, f} + \frac {b \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac {b \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3*(a+b*sin(f*x+e)),x, algorithm="giac")

[Out]

3/8*b*x + 1/12*a*cos(3*f*x + 3*e)/f - 3/4*a*cos(f*x + e)/f + 1/32*b*sin(4*f*x + 4*e)/f - 1/4*b*sin(2*f*x + 2*e
)/f

________________________________________________________________________________________

maple [A]  time = 0.22, size = 60, normalized size = 0.78 \[ \frac {b \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)^3*(a+b*sin(f*x+e)),x)

[Out]

1/f*(b*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/3*a*(2+sin(f*x+e)^2)*cos(f*x+e))

________________________________________________________________________________________

maxima [A]  time = 1.32, size = 57, normalized size = 0.74 \[ \frac {32 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a + 3 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b}{96 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3*(a+b*sin(f*x+e)),x, algorithm="maxima")

[Out]

1/96*(32*(cos(f*x + e)^3 - 3*cos(f*x + e))*a + 3*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*b)/f

________________________________________________________________________________________

mupad [B]  time = 10.29, size = 111, normalized size = 1.44 \[ \frac {3\,b\,x}{8}-\frac {-\frac {3\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{4}-\frac {11\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{4}+4\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+\frac {11\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{4}+\frac {16\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{3}+\frac {3\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}+\frac {4\,a}{3}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)^3*(a + b*sin(e + f*x)),x)

[Out]

(3*b*x)/8 - ((4*a)/3 + (3*b*tan(e/2 + (f*x)/2))/4 + (16*a*tan(e/2 + (f*x)/2)^2)/3 + 4*a*tan(e/2 + (f*x)/2)^4 +
 (11*b*tan(e/2 + (f*x)/2)^3)/4 - (11*b*tan(e/2 + (f*x)/2)^5)/4 - (3*b*tan(e/2 + (f*x)/2)^7)/4)/(f*(tan(e/2 + (
f*x)/2)^2 + 1)^4)

________________________________________________________________________________________

sympy [A]  time = 1.34, size = 144, normalized size = 1.87 \[ \begin {cases} - \frac {a \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {2 a \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 b x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 b x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 b x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {5 b \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 b \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\relax (e )}\right ) \sin ^{3}{\relax (e )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)**3*(a+b*sin(f*x+e)),x)

[Out]

Piecewise((-a*sin(e + f*x)**2*cos(e + f*x)/f - 2*a*cos(e + f*x)**3/(3*f) + 3*b*x*sin(e + f*x)**4/8 + 3*b*x*sin
(e + f*x)**2*cos(e + f*x)**2/4 + 3*b*x*cos(e + f*x)**4/8 - 5*b*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 3*b*sin(e
+ f*x)*cos(e + f*x)**3/(8*f), Ne(f, 0)), (x*(a + b*sin(e))*sin(e)**3, True))

________________________________________________________________________________________